/* 
 * File:   Server.h
 * Author: nrechten
 *
 * Created on 18 April 2011, 16:30
 */

#ifndef NRPSTG_SERVER_H
#define	NRPSTG_SERVER_H

#include "TerrainDatasource.h"
#include "Terrain.h"
#include "SceneModel.h"
#include "Common.h"

class Block;
class TerrainDatasource;

/**
 *
 * The server manages new connections from clients, this class is not fully implemented
 * yet as the "server" and client always run at the same time so we don't need to
 * manage clients connecting.
 *
 */
class Server {
public:
    Server(SceneModel* sm);
    virtual ~Server();

    UNIT foo;
    virtual void load_block(UNIT* coord, UNIT coord_depth, UNIT lod);

    
    TerrainDatasource* terrain_datasource;

    
private:
    SceneModel* _sm;
};


/**
 * When a client connects to the server an object of this class is created to handle
 * communication between the server and the client from the server end. It function
 * is to convert messages sent from the client to the server into method calls on
 * the server object. It also manages the hand shake / auth status to the client
 * and the server and limits access based on this.
 */
//class ClientManager {
//public:
//    ClientManager(Server* s);
//    virtual ~ClientManager();
//
//    Block* load_block(UNIT* coord, UNIT coord_depth, UNIT lod);
//};

#endif	/* SERVER_H */

